# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=gnome-metronome
pkgver=1.2.0
pkgrel=0
pkgdesc="Metronome beats the rhythm for you"
url="https://apps.gnome.org/app/com.adrienplazas.Metronome/"
# s390x, riscv64: blocked by cargo, gtk4.0, libadwaita, rust
arch="all !s390x !riscv64"
license="GPL-3.0-or-later"
makedepends="
	cargo
	glib-dev
	gst-plugins-bad-dev
	gst-plugins-base-dev
	gstreamer-dev
	gtk4.0-dev
	libadwaita-dev
	meson
	rust
"
source="https://gitlab.gnome.org/World/metronome/-/archive/$pkgver/metronome-$pkgver.tar.gz"
builddir="$srcdir/metronome-$pkgver"

export CARGO_PROFILE_RELEASE_LTO=true
export CARGO_PROFILE_RELEASE_PANIC=abort
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"

build() {
	abuild-meson build
	meson compile ${JOBS:+-j ${JOBS}} -C build
}

check() {
	meson check
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}

sha512sums="
b51b03380e5f0f54bed1093b8b5264cb5f6c319308ee56253e3e7255ad94dfaa390adb2a8df192ffeb15b265f04661432a90e0c971800db5804630ed2d6503ac  metronome-1.2.0.tar.gz
"
